.class Lcom/xingbook/ui/a/h;
.super Landroid/view/SurfaceView;

# interfaces
.implements Landroid/view/SurfaceHolder$Callback;


# instance fields
.field final synthetic a:Lcom/xingbook/ui/a/f;


# direct methods
.method public constructor <init>(Lcom/xingbook/ui/a/f;Landroid/content/Context;)V
    .locals 2

    iput-object p1, p0, Lcom/xingbook/ui/a/h;->a:Lcom/xingbook/ui/a/f;

    invoke-direct {p0, p2}, Landroid/view/SurfaceView;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/ui/a/h;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v0

    invoke-static {p1, v0}, Lcom/xingbook/ui/a/f;->a(Lcom/xingbook/ui/a/f;Landroid/view/SurfaceHolder;)V

    invoke-static {p1}, Lcom/xingbook/ui/a/f;->d(Lcom/xingbook/ui/a/f;)Landroid/view/SurfaceHolder;

    move-result-object v0

    invoke-interface {v0, p0}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V

    invoke-static {p1}, Lcom/xingbook/ui/a/f;->d(Lcom/xingbook/ui/a/f;)Landroid/view/SurfaceHolder;

    move-result-object v0

    const/4 v1, 0x3

    invoke-interface {v0, v1}, Landroid/view/SurfaceHolder;->setType(I)V

    return-void
.end method


# virtual methods
.method public surfaceChanged(Landroid/view/SurfaceHolder;III)V
    .locals 0

    return-void
.end method

.method public surfaceCreated(Landroid/view/SurfaceHolder;)V
    .locals 0

    return-void
.end method

.method public surfaceDestroyed(Landroid/view/SurfaceHolder;)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/a/h;->a:Lcom/xingbook/ui/a/f;

    invoke-static {v0}, Lcom/xingbook/ui/a/f;->e(Lcom/xingbook/ui/a/f;)Landroid/hardware/Camera;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/h;->a:Lcom/xingbook/ui/a/f;

    invoke-static {v0}, Lcom/xingbook/ui/a/f;->e(Lcom/xingbook/ui/a/f;)Landroid/hardware/Camera;

    move-result-object v0

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    iget-object v0, p0, Lcom/xingbook/ui/a/h;->a:Lcom/xingbook/ui/a/f;

    invoke-static {v0}, Lcom/xingbook/ui/a/f;->e(Lcom/xingbook/ui/a/f;)Landroid/hardware/Camera;

    move-result-object v0

    invoke-virtual {v0}, Landroid/hardware/Camera;->release()V

    iget-object v0, p0, Lcom/xingbook/ui/a/h;->a:Lcom/xingbook/ui/a/f;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/xingbook/ui/a/f;->a(Lcom/xingbook/ui/a/f;Landroid/hardware/Camera;)V

    :cond_0
    return-void
.end method
